import { MyRequestOptions,HttpResponse } from './type';
import request from '@/utils/api/request';

export const saveUserAddress = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/user/info/saveUserAddress`;
  return request.post(option);
};

export const queryUserAddressList = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/user/info/queryUserAddressList`;
  return request.post(option);
};

export const deleteUserAddressById = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/user/info/deleteUserAddressById`;
  return request.get(option);
};

export const setAddressInfo = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/user/info/setAddressInfo`;
  return request.post(option);
};
export const queryUserAddress = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/user/info/queryUserAddress`;
  return request.get(option);
};
